// Name: David Andersen

using UnityEngine;
using System.Collections;

public class Bucket_Hit : MonoBehaviour {
	
	public GameObject controller;

	// Use this for initialization
	void Start () {
		controller = GameObject.Find("Controller");
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	void OnCollisionEnter(Collision collision)
	{
		if(transform.position.y < -85.0F)
		{
			audio.Play();
			controller.GetComponent<Controller_Script>().score += 30;
		}
		else
		{
			audio.Play();
			controller.GetComponent<Controller_Script>().score += 10;
		}
	}
}
